﻿namespace Asistente.Model.Representation
{
    public class Form : EditablePanel
    {
        public override Panel Clone()
        {

            Form newEditablePanel = new Form();
            newEditablePanel.Name = this.Name;
            newEditablePanel.Entity = Entity;
            foreach (Entity item in UpdatesDeletesCascade)
            {
                newEditablePanel.UpdatesDeletesCascade.Add(item);
            }
            foreach (Control ctrl in base.Controls)
            {
                newEditablePanel.Controls.Add(ctrl);
            }

            return newEditablePanel;
        }
    }
}
